simetrix.dvm.PostTestContext¶
- class simetrix.dvm.PostTestContext¶
Bases:
ComplexTestContextProvides contextual information for a post-process script about a currently executing testplan.
Methods
createScalar(name, value)Creates a scalar measurement.
createSpecification(name, status, description)Creates a test specification.
createStatistic(name, value)Creates a statistic.
createStatisticSpecification(name, status, ...)Creates a statistic specification.
label()Returns the label for the test.
logData()Returns the log data about the active test.
promoteGraph(name[, weight, fuzzyLogic])Adds a graph to the overview report.
promoteScalar(name, value[, newName])Adds a scalar to the overview report.
Returns the path of the directory containing the report.
- createScalar(name: str, value: str) None¶
Creates a scalar measurement.
- Parameters:
name (str) – Name of the scalar.
value (str) – Value for the scalar.
- createSpecification(name: str, status: TestStatus, description: str) None¶
Creates a test specification.
- Parameters:
name (str) – Name of the specification.
status (TestStatus) – Status of the test.
description (str) – Description for the specification.
- createStatistic(name: str, value: str) None¶
Creates a statistic.
- Parameters:
name (str) – Name of the statistic.
value (str) – Value for the statistic.
- createStatisticSpecification(name: str, status: TestStatus, description: str) None¶
Creates a statistic specification.
- Parameters:
name (str) – Name of the specification.
status (TestStatus) – Status of the test.
description (str) – Description for the specification.
- label() str¶
Returns the label for the test.
- Returns:
Label for the test.
- Return type:
str
- logData() LogTestData¶
Returns the log data about the active test.
- promoteGraph(name: str, weight: int = None, fuzzyLogic: bool = None) None¶
Adds a graph to the overview report.
This allows for multiple graphs to be listed within the report.
- Parameters:
name (str) – Name of a DVM-generated graph to promote.
weight (int, optional) – A number that indicates the order in which you want the graph to appear with the higher numbered graphs appearing first in the report.
fuzzyLogic (bool, optional) – States whether the provided name is only an approximation, where if set to true the name will be searched for in the actual graph names in report.txt.
- promoteScalar(name: str, value: str, newName: str = None) None¶
Adds a scalar to the overview report.
This allows for custom values to be specified within the report.
- Parameters:
name (str) – Name of the scalar to add.
value (str) – String value for the scalar to add.
newName (str, optional) – New name for the added scalar.
- reportDirectory() str¶
Returns the path of the directory containing the report.
- Returns:
Path of the directory containing the report.
- Return type:
str